﻿package mortal.game.view.forging.view
{
    import Message.Game.*;
    import com.mui.controls.*;
    import com.mui.utils.*;
    import extend.language.*;
    import flash.events.*;
    import flash.utils.*;
    import mortal.common.*;
    import mortal.common.global.*;
    import mortal.common.swfPlayer.*;
    import mortal.common.swfPlayer.data.*;
    import mortal.component.window.*;
    import mortal.game.cache.*;
    import mortal.game.events.*;
    import mortal.game.manager.*;
    import mortal.game.mvc.*;
    import mortal.game.resource.*;
    import mortal.game.resource.info.item.*;
    import mortal.game.utils.*;
    import mortal.game.view.common.*;
    import mortal.game.view.common.display.*;
    import mortal.game.view.common.item.*;
    import mortal.game.view.forging.*;
    import mortal.game.view.forging.data.*;
    import mortal.game.view.forging.util.*;
    import mortal.game.view.palyer.*;
    import mortal.game.view.systemSetting.*;
    import mortal.mvc.core.*;

    public class GemStrengthenPanelNew extends ForgingPanelBase
    {
        private var _bestReviewEquip:PlayerEquipItem;
        private var _gemInfo1:GemInfo;
        private var _gemInfo2:GemInfo;
        private var _gemInfo3:GemInfo;
        private var _gemInfo4:GemInfo;
        private var _gemInfo5:GemInfo;
        private var _gemInfo6:GemInfo;
        private var _gemLevelText:GTextFiled;
        private var _gemQualDesc:GTextFiled;
        private var _gemCombat:BitmapNumberText;
        private var _propName:GTextFiled;
        private var _propValue:GTextFiled;
        private var _upArrow:GBitmap;
        private var _upValue:GTextFiled;
        private var _progressBar:BaseProgressBar;
        private var _progressPoint:GBitmap;
        private var _consumeItem:BaseItem;
        private var _upCost:GTextFiled;
        private var _goldIcon:GBitmap;
        private var _commonStrengBtn:GButton;
        private var _onKeyStrengBtn:GButton;
        private var _autoBuyBox:GCheckBox;
        private var _selEquipTip:GImageBitmap;
        private var _maxLevelTxt:GTextFiled;
        private var _defaultTxt1:GTextFiled;
        private var _defaultTxt2:GTextFiled;
        private var _equipName:GTextFiled;
        private var _currSelGem:GTextFiled;
        private var _packBtn:GLoadingButton;
        private var _gemInfoArr:Array;
        private var _currStrengLevel:int;
        private var _isStrengUpdate:Boolean;
        private var _isMoneyEnough:Boolean = true;
        private var _timeOutIndex:int;
        private var _swfPlayer:SWFPlayer;
        private var _isPlaying:Boolean;
        private var _isCommonStreng:Boolean;
        public static var currSelGem:GemInfo;

        public function GemStrengthenPanelNew(param1:Window = null)
        {
            this._gemInfoArr = [];
            super(param1);
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            this.pushUIToDisposeVec(UIFactory.gImageBitmap(ImagesConst.EquipStrengPart, 25, 11 + 24, this));
            this.pushUIToDisposeVec(UIFactory.gBitmap(ImagesConst.TextBg3, 157 - 25, 1, this));
            this._equipName = UIFactory.gTextField("", 128, 7, 234, 20, this, GlobalStyle.textFormatHuang.center());
            _currOperEquip = UICompomentPool.getUICompoment(PlayerEquipItem);
            _currOperEquip.setItemStyle(ItemStyleConst.Big, "", 0, 0);
            _currOperEquip.x = 213;
            _currOperEquip.y = 74 + 24;
            this.addChild(_currOperEquip);
            _currOperEquip.configEventListener(MouseEvent.CLICK, onEquipClickHandler);
            this._bestReviewEquip = UICompomentPool.getUICompoment(PlayerEquipItem);
            this._bestReviewEquip.setItemStyle(ItemStyleConst.Small, ImagesConst.EquipItemBg, 5, 5);
            this._bestReviewEquip.x = 12;
            this._bestReviewEquip.y = 10;
            this.addChild(this._bestReviewEquip);
            this.pushUIToDisposeVec(UIFactory.gImageBitmap(ImagesConst.Forging_StrengBestPreview, 6, 55, this));
            this._gemInfo1 = UICompomentPool.getUICompoment(GemInfo);
            this._gemInfo1.x = 96 + 30;
            this._gemInfo1.y = 213 - 40;
            this._gemInfo1.index = 1;
            this.addChild(this._gemInfo1);
            this._gemInfoArr.push(this._gemInfo1);
            this._gemInfo2 = UICompomentPool.getUICompoment(GemInfo);
            this._gemInfo2.x = 348 - 30;
            this._gemInfo2.y = 213 - 40;
            this._gemInfo2.index = 2;
            this.addChild(this._gemInfo2);
            this._gemInfoArr.push(this._gemInfo2);
            this._gemInfo3 = UICompomentPool.getUICompoment(GemInfo);
            this._gemInfo3.x = 60 + 3 + 26;
            this._gemInfo3.y = 114 + 10 - 19;
            this._gemInfo3.index = 3;
            this.addChild(this._gemInfo3);
            this._gemInfoArr.push(this._gemInfo3);
            this._gemInfo4 = UICompomentPool.getUICompoment(GemInfo);
            this._gemInfo4.x = 381 - 26;
            this._gemInfo4.y = 114 + 10 - 19;
            this._gemInfo4.index = 4;
            this.addChild(this._gemInfo4);
            this._gemInfoArr.push(this._gemInfo4);
            this._gemInfo5 = UICompomentPool.getUICompoment(GemInfo);
            this._gemInfo5.x = 96 + 30;
            this._gemInfo5.y = 38;
            this._gemInfo5.index = 5;
            this.addChild(this._gemInfo5);
            this._gemInfoArr.push(this._gemInfo5);
            this._gemInfo6 = UICompomentPool.getUICompoment(GemInfo);
            this._gemInfo6.x = 348 - 30;
            this._gemInfo6.y = 38;
            this._gemInfo6.index = 6;
            this.addChild(this._gemInfo6);
            this._gemInfoArr.push(this._gemInfo6);
            this.pushUIToDisposeVec(UIFactory.bg(125 - 7, 300 - 69, 256, 130, this, ImagesConst.AttributeBg));
            this._currSelGem = UIFactory.gTextField(Language.getString(41174), 125 - 7 + 32, 300 - 69 + 11, 100, 20, this, GlobalStyle.textFormatLv);
            this._gemLevelText = UIFactory.gTextField("", 125 - 7 + 116, 300 - 69 + 11, 50, 30, this, GlobalStyle.textFormatHuang2);
            this._gemQualDesc = UIFactory.gTextField("", 125 - 7 + 143, 300 - 69 + 11, 110, 20, this, GlobalStyle.textFormatBai);
            this.pushUIToDisposeVec(UIFactory.bg(125 - 7, 300 - 69 + 33, 256, 23, this, ImagesConst.RegionTitleBg));
            this.pushUIToDisposeVec(UIFactory.gImageBitmap(ImagesConst.Forging_Text_GemCombat, 125 - 7 + 87, 300 - 69 + 36, this));
            this._gemCombat = UIFactory.bitmapNumberText(125 - 7 + 151, 300 - 69 + 36, "FightInfoNum.png", 12, 15, -1, this);
            this._defaultTxt1 = UIFactory.gTextField(Language.getString(41175), 125 - 7 + 151, 300 - 69 + 36 - 2, 62, 20, this);
            this._propName = UIFactory.gTextField(Language.getString(41162), 181 + 5 + 20, 300 - 69 + 63, 57, 20, this, GlobalStyle.textFormatAnjin);
            this._propValue = UIFactory.gTextField("", 125 - 7 + 115, 300 - 69 + 63, 40, 20, this);
            this._defaultTxt2 = UIFactory.gTextField(Language.getString(41175), 125 - 7 + 151, 320 - 4 - 21, 40, 20, this);
            this._upArrow = UIFactory.gBitmap(ImagesConst.upgradeArrow, 125 - 7 + 155, 300 - 69 + 67, this);
            this._upArrow.visible = false;
            this._upValue = UIFactory.gTextField("", 125 - 7 + 176, 300 - 69 + 63, 40, 20, this, GlobalStyle.textFormatLv);
            this._progressBar = UICompomentPool.getUICompoment(BaseProgressBar);
            this._progressBar.setBg(ImagesConst.StrengthenBarBg2, true, 268, 13);
            this._progressBar.setProgress(ImagesConst.StrengthenBar2, true, 14, 1, 240, 12);
            this._progressBar.setLabel(BaseProgressBar.ProgressBarTextPercent, 270, -4, 35, 20, GlobalStyle.textFormatHuang);
            this._progressBar.setValue(0, 10000);
            this._progressBar.x = 126 - 16;
            this._progressBar.y = 339;
            this.addChild(this._progressBar);
            this._maxLevelTxt = UIFactory.gTextField(Language.getString(41176), 214 + 10, 360 - 5, 50, 20, this, GlobalStyle.textFormatHong);
            this._maxLevelTxt.visible = false;
            this._progressPoint = UIFactory.gBitmap(ImagesConst.StrengthenBarPoint2, 0, -8 - 4, this._progressBar);
            this._progressPoint.visible = false;
            this.pushUIToDisposeVec(UIFactory.gTextField(Language.getString(41177), 61 - 12, 302, 70, 20, this, GlobalStyle.textFormatLv));
            this._consumeItem = UICompomentPool.getUICompoment(BaseItem);
            this._consumeItem.setItemStyle(ItemStyleConst.Small, ImagesConst.PackItemBg, 2, 2);
            this._consumeItem.x = 76 - 16;
            this._consumeItem.y = 324;
            this.addChild(this._consumeItem);
            this.pushUIToDisposeVec(UIFactory.gTextField(Language.getString(41178), 95, 410, 65, 20, this));
            this._upCost = UIFactory.gTextField("", 179 - 25, 410, 36, 20, this);
            this._goldIcon = UIFactory.gBitmap(ImagesConst.Jinbi_bind, 211 - 25, 409, this);
            this._commonStrengBtn = UIFactory.gButton(Language.getString(41179), 157, 369, 83, 27, this, "BrownBtn");
            this._commonStrengBtn.mouseChildren = false;
            this._commonStrengBtn.toolTipData = Language.getString(41180);
            this._onKeyStrengBtn = UIFactory.gButton(Language.getString(41181), 263, 369, 83, 27, this, "BrownBtn");
            this._onKeyStrengBtn.mouseChildren = false;
            this._onKeyStrengBtn.toolTipData = Language.getString(41182);
            this._commonStrengBtn.name = "gemStrenthen_oneKey";
            this._commonStrengBtn.configEventListener(MouseEvent.CLICK, this.onClickHandler);
            this._onKeyStrengBtn.configEventListener(MouseEvent.CLICK, this.onClickHandler);
            this._autoBuyBox = UIFactory.checkBox(Language.getString(41183), 356 - 93, 402 + 5, 140, 28, this);
            this._autoBuyBox.configEventListener(MouseEvent.CLICK, this.onClickHandler);
            this._selEquipTip = UIFactory.gImageBitmap(ImagesConst.GemStreng_SelEquipTip, 469, 28, this);
            this._packBtn = UIFactory.gLoadingButton(ResFileConst.GemPackBtn, 12, 172, 50, 50, this);
            this._packBtn.configEventListener(MouseEvent.CLICK, this.onClickPackBtn);
            this._swfPlayer = UICompomentPool.getUICompoment(SWFPlayer);
            this.setGridLayout();
            this.initAutoBuyState();
            this.addListeners();
            GemPackWin.instance.show();
            return;
        }// end function

        private function addListeners() : void
        {
            NetDispatcher.addCmdListener(ServerCommand.ForgingGemInfoUpdate, this.onGemInfoUpdateHandler);
            Dispatcher.addEventListener(EventName.ForgingOnSelGem, this.onSelGemHandler);
            NetDispatcher.addCmdListener(ServerCommand.RoleLevelUpdate, this.onLevelUpdateHandler);
            Dispatcher.addEventListener(EventName.ForgingEmbedGem, this.onEmbedGemHandler);
            return;
        }// end function

        private function removeListeners() : void
        {
            NetDispatcher.removeCmdListener(ServerCommand.ForgingGemInfoUpdate, this.onGemInfoUpdateHandler);
            Dispatcher.removeEventListener(EventName.ForgingOnSelGem, this.onSelGemHandler);
            NetDispatcher.removeCmdListener(ServerCommand.RoleLevelUpdate, this.onLevelUpdateHandler);
            Dispatcher.removeEventListener(EventName.ForgingEmbedGem, this.onEmbedGemHandler);
            return;
        }// end function

        private function initAutoBuyState() : void
        {
            if (ClientSetting.local.getIsDone(IsDoneType.AutoBuyGemProp))
            {
                this._autoBuyBox.selected = true;
            }
            else
            {
                this._autoBuyBox.selected = false;
            }
            return;
        }// end function

        private function setGridLayout() : void
        {
            var _loc_1:* = Cache.instance.role.entityInfo.level;
            if (_loc_1 < 100)
            {
                this._gemInfo5.visible = false;
                this._gemInfo6.visible = false;
                this._gemInfo3.x = 96 + 30;
                this._gemInfo3.y = 38;
                this._gemInfo4.x = 348 - 30;
                this._gemInfo4.y = 38;
            }
            else
            {
                this._gemInfo5.visible = true;
                this._gemInfo6.visible = true;
                this._gemInfo3.x = 60 + 3 + 26;
                this._gemInfo3.y = 114 + 10 - 19;
                this._gemInfo4.x = 381 - 26;
                this._gemInfo4.y = 114 + 10 - 19;
            }
            return;
        }// end function

        override public function addForgingEquip(param1:PlayerEquipItem) : void
        {
            var _loc_2:Array = null;
            var _loc_3:int = 0;
            var _loc_4:SJewelHoleInfo = null;
            this.clearUI();
            super.addForgingEquip(param1);
            if (param1 && param1.itemData)
            {
                this.stopAllStrengthenEffect();
                this.updateEquipNameInfo();
                _loc_2 = Cache.instance.forging.getGemDataByEquipType(param1.itemData.itemInfo.type);
                if (_loc_2)
                {
                    _loc_3 = 0;
                    while (_loc_3 < _loc_2.length)
                    {
                        
                        _loc_4 = _loc_2[_loc_3] as SJewelHoleInfo;
                        this._gemInfoArr[_loc_3].data = _loc_4;
                        _loc_3++;
                    }
                    this.defaultSelFasterUpgradeGem();
                }
                this.updateConsume();
                this.updateMoneyState();
                Dispatcher.dispatchEvent(new DataEvent(EventName.ForgingGemSwitchEquip));
            }
            return;
        }// end function

        override public function updateUI() : void
        {
            var _loc_1:* = Cache.instance.pack.packRolePackCache.getBestRecommendEquip();
            Dispatcher.dispatchEvent(new DataEvent(EventName.ForgingSelDefaultEquip, _loc_1));
            return;
        }// end function

        private function defaultSelFasterUpgradeGem() : void
        {
            var _loc_1:GemInfo = null;
            var _loc_3:GemInfo = null;
            var _loc_2:* = int.MAX_VALUE;
            for each (_loc_3 in this._gemInfoArr)
            {
                
            }
            if (_loc_1)
            {
                Dispatcher.dispatchEvent(new DataEvent(EventName.ForgingOnSelGem, _loc_1.index));
            }
            return;
        }// end function

        override public function updateForgingInfo() : void
        {
            return;
        }// end function

        private function onGemInfoUpdateHandler(param1:Object) : void
        {
            var _loc_3:PlayerEquipItem = null;
            var _loc_2:* = param1 as SJewelHolesInfoMsg;
            if (_loc_2)
            {
                _loc_3 = (GameController.forging.view as ForgingModule).equipDisplaySpr.currSelEquip;
                if (!_loc_3)
                {
                    return;
                }
                var _loc_4:* = setTimeout(this.gemInfoUpdateAfterStreng, 200);
                this._timeOutIndex = setTimeout(this.gemInfoUpdateAfterStreng, 200);
            }
            return;
        }// end function

        private function gemInfoUpdateAfterStreng() : void
        {
            var _loc_3:int = 0;
            var _loc_4:SJewelHoleInfo = null;
            clearTimeout(this._timeOutIndex);
            var _loc_1:* = (GameController.forging.view as ForgingModule).equipDisplaySpr.currSelEquip;
            if (!_loc_1)
            {
                return;
            }
            var _loc_2:* = Cache.instance.forging.getGemDataByEquipType(_loc_1.itemData.itemInfo.type);
            if (_loc_2)
            {
                _loc_3 = 0;
                while (_loc_3 < _loc_2.length)
                {
                    
                    _loc_4 = _loc_2[_loc_3] as SJewelHoleInfo;
                    var _loc_5:* = _loc_4;
                    this._gemInfoArr[_loc_3].data = _loc_4;
                    _loc_3++;
                }
            }
            if (currSelGem && currSelGem.itemData)
            {
                this.updateAll();
            }
            return;
        }// end function

        private function updateAll() : void
        {
            this.updateBestReview();
            this.updateGemDesc();
            this.updateAttrAndCombat();
            this.updateConsume();
            this.updateProgressBar();
            this.updateMoneyState();
            return;
        }// end function

        private function updateBestReview() : void
        {
            return;
        }// end function

        private function updateGemDesc() : void
        {
            return;
        }// end function

        private function updateAttrAndCombat() : void
        {
            return;
        }// end function

        private function updateProgressBar() : void
        {
            return;
        }// end function

        private function playSwfStrengEffect() : void
        {
            var _loc_1:String = null;
            if (!this._isPlaying)
            {
                _loc_1 = this._isCommonStreng == true ? ("StrengDownCommonEffect.swf") : ("StrengDownPerfectEffect.swf");
                if (this._isCommonStreng)
                {
                    this._swfPlayer.move(250 - 5 + 10 - 13, 107 + 252 + 10 - 23);
                }
                else
                {
                    this._swfPlayer.move(250 - 5 + 23 - 13, 107 + 244 + 10 - 23);
                }
                this._swfPlayer.load(_loc_1, ModelType.NormalSwf, null);
                var _loc_2:* = this.onStrengEffectEnd;
                this._swfPlayer.framesPlayerCompleteHandler = this.onStrengEffectEnd;
                this.addChild(this._swfPlayer);
                var _loc_2:Boolean = true;
                this._isPlaying = true;
            }
            return;
        }// end function

        private function onStrengEffectEnd(param1:SWFPlayer) : void
        {
            var _loc_2:String = null;
            this._swfPlayer.framesPlayerCompleteHandler = null;
            this._swfPlayer.stop();
            DisplayUtil.removeMe(this._swfPlayer);
            var _loc_2:Boolean = false;
            this._isPlaying = false;
            return;
        }// end function

        public function stopAllStrengthenEffect() : void
        {
            if (this._isPlaying)
            {
                this._swfPlayer.stop();
                DisplayUtil.removeMe(this._swfPlayer);
                var _loc_1:Boolean = false;
                this._isPlaying = false;
            }
            return;
        }// end function

        private function updateConsume() : void
        {
            var _loc_1:* = new ItemData(ForgingConst.GemStrengItemCode);
            var _loc_2:* = _loc_1;
            this._consumeItem.itemData = _loc_1;
            this.updateConsumeState();
            return;
        }// end function

        override public function updateConsumeState() : void
        {
            var _loc_1:int = 0;
            var _loc_2:int = 0;
            var _loc_3:int = 0;
            if (this._consumeItem.itemData)
            {
                _loc_1 = this._consumeItem.itemData.itemInfo.type;
                _loc_2 = 1;
                _loc_3 = Cache.instance.pack.backPackCache.getItemCountByItemData(this._consumeItem.itemData);
                if (_loc_2 <= _loc_3)
                {
                    var _loc_4:Boolean = false;
                    this._consumeItem.isGray = false;
                }
                else
                {
                    var _loc_4:Boolean = true;
                    this._consumeItem.isGray = true;
                }
            }
            return;
        }// end function

        override public function updateMoneyState() : void
        {
            this.updateFee(ForgingConst.GemUpgradeFee);
            return;
        }// end function

        public function updateFee(param1:int) : void
        {
            if (param1 == 0)
            {
                var _loc_2:String = "";
                this._upCost.text = "";
            }
            else
            {
                var _loc_2:* = "" + param1;
                this._upCost.text = "" + param1;
                if (param1 > Cache.instance.role.money.coin + Cache.instance.role.money.coinBind)
                {
                    var _loc_2:* = GlobalStyle.colorHongUint;
                    this._upCost.textColor = GlobalStyle.colorHongUint;
                    var _loc_2:Boolean = false;
                    this._isMoneyEnough = false;
                }
                else
                {
                    var _loc_2:* = GlobalStyle.colorHuangUint;
                    this._upCost.textColor = GlobalStyle.colorHuangUint;
                    var _loc_2:Boolean = true;
                    this._isMoneyEnough = true;
                }
            }
            return;
        }// end function

        private function updateEquipNameInfo() : void
        {
            var _loc_1:* = ItemsUtil.getItemWholeName(_currOperEquip.itemData, true, 1, false);
            this._equipName.htmlText = ItemsUtil.getItemWholeName(_currOperEquip.itemData, true, 1, false);
            return;
        }// end function

        private function onSelGemHandler(event:DataEvent) : void
        {
            return;
        }// end function

        private function onClickHandler(event:MouseEvent) : void
        {
            return;
        }// end function

        private function onEmbedGemHandler(event:DataEvent) : void
        {
            var _loc_5:SJewelHoleInfo = null;
            var _loc_2:* = event.data as ItemData;
            var _loc_3:* = GameController.forging.forgingWin.equipDisplaySpr.currSelEquip;
            if (!(_loc_3 && _loc_3.itemData))
            {
                MsgManager.showRollTipsMsg(Language.getString(41184));
                return;
            }
            var _loc_4:* = GemUtil.getCanEmbedGemHole();
            if (_loc_4 != null)
            {
                GameProxy.equip.jewelEmbedNew(_loc_3.itemData.uid, _loc_4.index, _loc_2.uid);
                Dispatcher.dispatchEvent(new DataEvent(EventName.ForgingOnSelGem, _loc_4.index));
            }
            else
            {
                _loc_5 = GemUtil.getCanReplaceGemHole(_loc_2);
                if (_loc_5)
                {
                    GameProxy.equip.jewelEmbedNew(_loc_3.itemData.uid, _loc_5.index, _loc_2.uid);
                    Dispatcher.dispatchEvent(new DataEvent(EventName.ForgingOnSelGem, _loc_5.index));
                }
                else
                {
                    MsgManager.showRollTipsMsg(Language.getString(41185));
                }
            }
            return;
        }// end function

        private function onClickPackBtn(event:MouseEvent) : void
        {
            if (GemPackWin.instance.isHide)
            {
                GemPackWin.instance.show();
            }
            else
            {
                GemPackWin.instance.hide();
            }
            return;
        }// end function

        private function showBuyMoneyTipWin() : void
        {
            Dispatcher.dispatchEvent(new DataEvent(EventName.ShowBindCoinPackWin));
            return;
        }// end function

        override public function clearUI() : void
        {
            var _loc_1:GemInfo = null;
            this.clearGemInfo();
            for each (_loc_4 in this._gemInfoArr)
            {
                
                _loc_1 = _loc_3[_loc_2];
                _loc_1.clear();
            }
            var _loc_2:String = null;
            GemStrengthenPanelNew.currSelGem = null;
            var _loc_2:String = "";
            this._equipName.text = "";
            var _loc_2:String = null;
            _currOperEquip.itemData = null;
            return;
        }// end function

        private function clearGemInfo() : void
        {
            var _loc_1:String = null;
            this._bestReviewEquip.itemData = null;
            this._bestReviewEquip.updateStrengLevel(0);
            var _loc_1:String = "";
            this._gemLevelText.text = "";
            var _loc_1:String = "";
            this._gemQualDesc.text = "";
            var _loc_1:String = "";
            this._gemCombat.text = "";
            var _loc_1:String = "";
            this._propValue.text = "";
            var _loc_1:Boolean = false;
            this._upArrow.visible = false;
            var _loc_1:String = "";
            this._upValue.text = "";
            var _loc_1:Boolean = true;
            this._defaultTxt1.visible = true;
            var _loc_1:Boolean = true;
            this._defaultTxt2.visible = true;
            this._progressBar.setValue(0, 10000);
            var _loc_1:Boolean = false;
            this._progressPoint.visible = false;
            var _loc_1:* = 181 + 5 + 20;
            this._propName.x = 181 + 5 + 20;
            return;
        }// end function

        private function onLevelUpdateHandler(param1:Object) : void
        {
            this.setGridLayout();
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            super.disposeImpl();
            this._bestReviewEquip.dispose();
            var _loc_2:String = null;
            this._bestReviewEquip = null;
            this._gemInfo1.dispose();
            var _loc_2:String = null;
            this._gemInfo1 = null;
            this._gemInfo2.dispose();
            var _loc_2:String = null;
            this._gemInfo2 = null;
            this._gemInfo3.dispose();
            var _loc_2:String = null;
            this._gemInfo3 = null;
            this._gemInfo4.dispose();
            var _loc_2:String = null;
            this._gemInfo4 = null;
            this._gemInfo5.dispose();
            var _loc_2:String = null;
            this._gemInfo5 = null;
            this._gemInfo6.dispose();
            var _loc_2:String = null;
            this._gemInfo6 = null;
            this._gemLevelText.dispose();
            var _loc_2:String = null;
            this._gemLevelText = null;
            this._gemQualDesc.dispose();
            var _loc_2:String = null;
            this._gemQualDesc = null;
            this._gemCombat.dispose();
            var _loc_2:String = null;
            this._gemCombat = null;
            this._propName.dispose();
            var _loc_2:String = null;
            this._propName = null;
            this._propValue.dispose();
            var _loc_2:String = null;
            this._propValue = null;
            this._upArrow.dispose();
            var _loc_2:String = null;
            this._upArrow = null;
            this._upValue.dispose();
            var _loc_2:String = null;
            this._upValue = null;
            this._progressBar.dispose();
            var _loc_2:String = null;
            this._progressBar = null;
            this._progressPoint.dispose();
            var _loc_2:String = null;
            this._progressPoint = null;
            this._consumeItem.dispose();
            var _loc_2:String = null;
            this._consumeItem = null;
            this._upCost.dispose();
            var _loc_2:String = null;
            this._upCost = null;
            this._goldIcon.dispose();
            var _loc_2:String = null;
            this._goldIcon = null;
            this._commonStrengBtn.dispose();
            var _loc_2:String = null;
            this._commonStrengBtn = null;
            this._onKeyStrengBtn.dispose();
            var _loc_2:String = null;
            this._onKeyStrengBtn = null;
            this._autoBuyBox.dispose();
            var _loc_2:String = null;
            this._autoBuyBox = null;
            this._selEquipTip.dispose();
            var _loc_2:String = null;
            this._selEquipTip = null;
            this._maxLevelTxt.dispose();
            var _loc_2:String = null;
            this._maxLevelTxt = null;
            this._defaultTxt1.dispose();
            var _loc_2:String = null;
            this._defaultTxt1 = null;
            this._defaultTxt2.dispose();
            var _loc_2:String = null;
            this._defaultTxt2 = null;
            this._equipName.dispose();
            var _loc_2:String = null;
            this._equipName = null;
            this._swfPlayer.dispose();
            var _loc_2:String = null;
            this._swfPlayer = null;
            _currOperEquip.dispose();
            var _loc_2:String = null;
            _currOperEquip = null;
            this._currSelGem.dispose();
            var _loc_2:String = null;
            this._currSelGem = null;
            this._packBtn.dispose();
            var _loc_2:String = null;
            this._packBtn = null;
            var _loc_2:int = 0;
            this._gemInfoArr.length = 0;
            var _loc_2:Boolean = false;
            this._isPlaying = false;
            var _loc_2:int = 0;
            this._currStrengLevel = 0;
            var _loc_2:Boolean = false;
            this._isStrengUpdate = false;
            var _loc_2:Boolean = true;
            this._isMoneyEnough = true;
            this.removeListeners();
            if (GemPackWin.hasInstanceShow())
            {
                GemPackWin.instance.hide();
            }
            return;
        }// end function

    }
}
